package com.siebre.picclife.asynctask.springcontext;

import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AnnotationTypeFilter;

import com.siebre.picclife.asynctask.annotation.AsyncTaskProxy;

class TaskProxyScanner extends ClassPathScanningCandidateComponentProvider {

	public TaskProxyScanner() {
		super(false);
		this.addIncludeFilter(new AnnotationTypeFilter(AsyncTaskProxy.class));
	}

	@Override
	protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition) {
		return beanDefinition.getMetadata().isInterface();
	}
}